(function(window,$){
  function addEvent (o, e, f) { 
    if (support.addEvent) o.addEventListener(e, f, false); 
    else if (support.attachEvent) r = o.attachEvent('on' + e, f); 
  }
  document = window.document
  //create an input element to use in the future
  var input = document.createElement('input')
  
  //create support object
  var support = {}
  // to avoid testing every time is require to use it
  // $.support.addEvent is aprox 70 % faster than !!window.addEventListener tested on Chrome 12 ;
  support.addEvent = !!window.addEventListener
  support.attachEvent = !!window.attachEvent
  // $.support.onhashchange is aprox 70 % faster than ('onhashchange' in window)  tested on Chrome 12 ;
  support.onhashchange = ('onhashchange' in window)
  
  
  support.placeholder = (function (){
      input.setAttribute('placeholder','testing')
      return input.getAttribute('placeholder') == 'testing' ;
    })(),

  $.support = $.extend($.support,support);
})(window,jQuery)

